package org.idea.spring.dependency.inject.type;

import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;

/**
 * 关于枚举的注入
 *
 * @Author linhao
 * @Date created in 12:28 下午 2021/4/23
 */
public class EnumInjectDemo {


    public static void main(String[] args) {
        DefaultListableBeanFactory defaultListableBeanFactory = new DefaultListableBeanFactory();
        XmlBeanDefinitionReader xmlBeanDefinitionReader = new XmlBeanDefinitionReader(defaultListableBeanFactory);
        String xmlPath = "classpath:/META-INF/type-independency-inject.xml";
        xmlBeanDefinitionReader.loadBeanDefinitions(xmlPath);
        User user = defaultListableBeanFactory.getBean(User.class);
        System.out.println(user);
    }
}
